<!DOCTYPE html>
<html>
<head></head>
<body>
<script src="../../resources/js-test.js"></script>
<form>
<input type="hidden" name="arguments"></input>
<div onclick="onclicked()" id="divInsideForm"></div>
</form>
</body>
<script>
var clicked = false;

function onclicked() {
   clicked = true;
}

var event = document.createEvent("MouseEvents");
event.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
var div = document.getElementById("divInsideForm");
div.dispatchEvent(event);

shouldBeTrue('clicked');

var successfullyParsed = true;
</script>
</html>
